package top.infopub.httpclient.base;


import java.io.Serializable;

import org.apache.commons.lang3.builder.ToStringBuilder;


/**
 * http返回封装bean
 * @author Awoke
 * @version 2018-4-12
 * @see HttpBizRsp
 * @since
 */
public class HttpBizRsp implements Serializable {

    private static final long serialVersionUID = -7268299972910538458L;

    /** 请求是否成功  **/
    private boolean isOk = false;

    /** 返回的业务数据 **/
    private String data;

    public HttpBizRsp() {

    }

    public HttpBizRsp(boolean isOk, String data) {
        super();
        this.isOk = isOk;
        this.data = data;
    }

    /** 请求是否成功  **/
    public boolean isOk() {
        return isOk;
    }

    public void setOk(boolean isOk) {
        this.isOk = isOk;
    }

    /** 请求成功时返回业务数据，请求失败时 返回：网络通讯异常~  **/
    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

}
